package com.fmsz.xmly.activitys;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import com.fmsz.xmly.R;

public class WelcomeActivity extends AppCompatActivity {
public Handler handler=new Handler(){

    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);
        Intent intent=new Intent(WelcomeActivity.this,AdvertiseActivity.class);
        startActivity(intent);
        finish();

    }
};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        ImageView imageView= (ImageView) findViewById(R.id.welcome_iv);
        imageView.setScaleType(ImageView.ScaleType.FIT_XY);
        Message msg = Message.obtain();
        handler.sendEmptyMessageDelayed(msg.what,1*1000);

    }
}



















